package cn.itcast.service.impl;

import cn.itcast.entity.SetmealDish;
import cn.itcast.mapper.ISetmealDishMapper;
import cn.itcast.service.ISetmealDishService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SetmealDishServiceImpl implements ISetmealDishService {
    @Autowired(required = false)
    private ISetmealDishMapper setmealDishMapper;
    @Override
    public void save(SetmealDish setmealDish) {
        setmealDishMapper.save(setmealDish);
    }

    @Override
    public List<SetmealDish> findById(Long id) {
        return setmealDishMapper.findBySetmealId(id);
    }

    @Override
    public void deleteBySetmealIds(Long[] ids) {
        setmealDishMapper.deleteWithSetmealId(ids);
    }
}
